Fix pagetable pinning logic for xen/i386 kernels. The pin
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Mon, 7 Nov 2005 17:14:45 +0000 (18:14 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Mon, 7 Nov 2005 17:14:45 +0000 (18:14 +0100)
commitc60a806bc21faef69d5fab9d13241e6dcc70186b
tree130d36dd3a3ac8f32a0c8c0cbb47b2309e23c7df
parentd5f66cab6a7d39705297a16e76c583c6117eb602
Fix pagetable pinning logic for xen/i386 kernels. The pin
flag is now associated with the pgd rather than the mm -- this
avoids a race where a pgd is allocated from the pgd_cache but,
before it gets associated with an mm, the kernel suspends itself.
At this point the kernel mappings will not get rewritten when the
kernel is resumed, and the system will fail.

A further advantage is that the code is slightly simpler and less
invasive (no changes to mm_context for example).

Signed-off-by: Keir Fraser <keir@xensource.com>
linux-2.6-xen-sparse/arch/xen/i386/kernel/ldt.c
linux-2.6-xen-sparse/arch/xen/i386/mm/init.c
linux-2.6-xen-sparse/arch/xen/i386/mm/pgtable.c
linux-2.6-xen-sparse/arch/xen/kernel/reboot.c
linux-2.6-xen-sparse/include/asm-xen/asm-i386/mmu.h
linux-2.6-xen-sparse/include/asm-xen/asm-i386/mmu_context.h
linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgalloc.h